home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
050
/
madtrb9.arc
/
POINTERS.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1985-02-11
|
547b
|
26 lines
program Pointers;
{$R+}
type
tempbuffer=^dynamic_buffer;
dynamic_buffer=array[1..25000] of char;
pointers = ^integer;
var
buffer : tempbuffer;
y:char; z: integer;
begin
getmem(buffer,25000);
writeln('Demo for dynamic allocation of memory for an array.');
writeln('position 1 and 45 of array should be a A.');
fillchar(buffer^,25000,' ');
buffer^[1]:=#65;
buffer^[45]:=#65;
for z:=1 to 50 do
begin
write(buffer^[z]); write(' ');
end;
delay(5000);
freemem(buffer,25000);
end.